<?php
namespace app\monitor\controller;
use think\Db;
use app\monitor\model\Concen;
use think\Request;

class Index
{
    public function index(Request $request)
    {
    	$pageSize   = $request -> param('pageSize');
    	$pageNumber = $request -> param('pageNumber');
    	$concen = model("Concen");
    	$result = $concen::all(function($query){
    		$query -> where('id', '>', 1) -> limit($pageNumber, 10);
    	});
    	$msg = array();
    	$msg["ret"]   = $result;
    	$msg["code"]  = 1;
    	$msg["count"] = count($result);    	
    	return json($msg);
    }

    public function read()
    {
    	$concen = Concen::get(82665);
    	echo $concen -> FS01;
    }
}
